<?php
$GET = $GLOBALS['MYT']->db_array("SELECT
					sleID AS COLID, sleName AS COL0, sleType AS COL1, sleDateStart AS COL2, sleDateEnd AS COL3, sleFlag AS COL4
					FROM sellers WHERE sleFlag = 2 AND sleID LIKE '%{$_GET['Inp']}%'");
$CARD = $GET[0];
?>
<div id="showsellers"></div>
<?php /*
  <script charset="utf-8" type="text/javascript">
  Ext.onReady(function(){
  var myData = [
  <?php
  for ($i=1;$i<=$CARD;$i++) {
  echo '['.$i.','.$GET[$i]['COLID'].',
  "'.$GET[$i]['COL0'].'",
  "'.$GET[$i]['COL1'].'",
  "'.$GET[$i]['COL2'].'",
  "'.$GET[$i]['COL3'].'",
  "'.$GET[$i]['COL4'].'"]';
  if ($i<$CARD) {
  echo ',';
  }
  } ?>
  ];

  var ds = new Ext.data.Store({
  reader: new Ext.data.ArrayReader({}, [
  {name: 'id'},
  {name: 'REF', type: 'int'},
  {name: 'O_ID', type: 'int'},
  {name: 'COL1', type: 'string'},
  {name: 'COL2', type: 'string'},
  {name: 'COL3', type: 'string'},
  {name: 'COL4', type: 'string'}
  ])
  });
  ds.loadData(myData);
  var colModel = new Ext.grid.ColumnModel([
  {header: "N", width: 80, sortable: true, locked:true, dataIndex: 'REF'},
  {header: "Numero", width: 80, sortable: true, locked:true, dataIndex: 'O_ID'},
  {header: "Nome", width: 200, sortable: true, locked:true, dataIndex: 'COL1'},
  {header: "Inicio", width: 120, sortable: true, dataIndex: 'COL2'},
  {header: "Fim", width: 120, sortable: true, locked:true,dataIndex: 'COL3'},
  {header: "Estado", width: 100, sortable: true, locked:true,dataIndex: 'COL4'}
  ]);

  var selmode = new Ext.grid.RowSelectionModel({});
  var Console = new Ext.grid.GridPanel({
  ds: ds,
  cm: colModel,
  sm: selmode,
  width: 380,
  height: 160,
  renderTo: 'showsellers',
  listeners: {
  rowdblclick: function() {
  document.ClientProperties.cliAgent.value=record.get('REF');
  Ext.getCmp('win_agent').close();
  }
  }
  });
  });
  </script> */ ?>
<table width="100%">
    <tr height="20px" bgcolor="<?php echo gridlines(1); ?>"><td>
	Numero</td><td width="200px">
	Nome</td><td>
	Inicio</td><td>
	Fim</td><td>
	Estado</td><td></tr>
    <?php
    for ($i = 1; $i <= $CARD; $i++) {
        echo '<tr height="20px" bgcolor="' . gridlines('.$i.') . '"><td>';
        mn_field('button', 'ED', 'id', $GET[$i]['COLID'], '', '', '', '" style="width:50px" onclick="
		document.ClientProperties.cliAgent.value=' . $GET[$i]['COLID'] . ';
			Ext.getCmp(\'win_agent\').close();');
        echo '</td><td>
	' . $GET[$i]['COL0'] . '</td><td>
	' . $GET[$i]['COL2'] . '</td><td>
	' . $GET[$i]['COL3'] . '</td><td>
	' . $GET[$i]['COL4'] . '</td><td></tr>';
    }
    ?>
</table>